package com.malty.shardingsphere.dao;

import com.malty.shardingsphere.domain.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author malty
 */
@Mapper
public interface AwEmployeeMapper {
    @Update("INSERT INTO employee (last_name,email,gender,age) VALUES (#{lastName},#{email},#{gender},#{age})")
    int createOne(Employee employee);

    @Select("SELECT * FROM employee")
    List<Employee> listAll();
}
